<%--
  Created by IntelliJ IDEA.
  User: guoshunw
  Date: 13-9-2
  Time: 上午10:02
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<table border="0" class="new-request-table">
    <tr>
        <td class="label"><s:text name="request.desc"/></td>
        <td><textarea id="description" name="description" rows="8"></textarea></td>
    </tr>
    <tr>
        <td class="label"><s:text name="request.attachments"/></td>
        <td rowspan="2">
            <jsp:include page="attachments.jsp">
                <jsp:param name="context" value="newRequest"/>
                <jsp:param name="uploadBrowserId" value="uploadRequestAttachment"/>
                <jsp:param name="gridId" value="requestAttachmentsGrid"/>
                <jsp:param name="uploaderId" value="requestAttachmentUpload"/>
            </jsp:include>
            <%--<s:include value="attachments.jsp">--%>
            <%--<s:param name="context" value="newRequest"/>--%>
            <%--</s:include>--%>
        </td>
    </tr>
    <tr>
        <td align="right" vlign="top">
            <span id="uploadRequestAttachment" style="width: 120px"></span>
        </td>
    </tr>
    <tr>
        <td class="label"><s:text name="request.targetDate"/></td>
        <td><input type="text" id="targetDate" name="targetDate"/></td>
    </tr>
</table>

<script type="text/javascript">
    $(function () {
        $("#targetDate").datepicker({dateFormat: "yy-mm-dd", minDate: new Date()});
        var requestForm = $('#' + global.NEW_REQUEST_TAB_ID);

        global.getIncludeAttributes = function () {
            var pNames = ['targetDate', "description"];
            var postDate=global.getAttributes(pNames);
            return postDate;
        }
    });

</script>
